package com.mes.biz.domain;

import javax.validation.Valid;
import javax.validation.constraints.NotBlank;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.mes.common.annotation.Excel;
import com.mes.common.core.domain.BaseEntity;
import com.mes.common.utils.log.annotation.FieldRemark;
import com.mes.common.utils.log.annotation.LogField;
import lombok.Data;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;
import java.util.List;

/**
 * 盘点单对象 biz_inventory_order
 * @author wy
 * @email wy
 * @date 2023-06-19
 */
@Data
public class BizInventoryOrder extends BaseEntity<BizInventoryOrder>
{
    private static final long serialVersionUID = 1L;

    /** 盘点单号 */
    @Excel(name = "盘点单号")
    @LogField
    @FieldRemark(name = "盘点单号",field = "inventoryCode")
    private String inventoryCode;

    /** 盘点人id */
    @Excel(name = "盘点人id")
    @LogField
    @FieldRemark(name = "盘点人id",field = "inventoryUserId")
    private String inventoryUserId;

    /** 盘点人名称 */
    @Excel(name = "盘点人名称")
    @LogField
    @FieldRemark(name = "盘点人名称",field = "inventoryUserName")
    private String inventoryUserName;

    /** 仓库 */
    @Excel(name = "仓库")
    @NotBlank(message = "仓库不允许为空")
    @LogField
    @FieldRemark(name = "仓库",field = "warehouseId")
    private String warehouseId;

    /** 租户id */
    @Excel(name = "租户id")
    @LogField
    @FieldRemark(name = "租户id",field = "tenantId")
    private String tenantId;

    /** 状态 1:待审核 2:已审核 */
    @Excel(name = "状态 1:待审核 2:已审核", dictType = "sys_normal_disable")
    @LogField
    @FieldRemark(name = "状态 1:待审核 2:已审核",field = "status")
    private String status;

    @JsonFormat(pattern = "yyyy-MM-dd")
    @DateTimeFormat(pattern="yyyy-MM-dd")
    private Date inventoryTime;

    private String warehouseName;

    private List<BizInventoryOrderDetail> detailList;
}
